package com.baselibrary.libs.example.example_viewpager_fragment.view;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by Administrator 于萌萌
 * 创建日期: 11:03 . 2016年09月14日
 * 描述:我的订单adapter ViewPager里面是Fragment
 * <p/>
 * <p/>
 * 备注:
 */
public class MyViewPagerAdapter extends FragmentPagerAdapter {
    public ArrayList<Fragment> fragments = new ArrayList<>();
    public MyViewPagerAdapter(FragmentManager fm, ArrayList<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {

        return fragments.get(position);
    }

    @Override
    public int getCount() {

        return fragments.size();
    }
}
